<?php
/**
 * | ---------------------------------------------------------------------------------------------------
 * | Author：johnxu <fsyzxz@163.com>.
 * | ---------------------------------------------------------------------------------------------------
 * | Home: https://www.johnxu.net.
 * | ---------------------------------------------------------------------------------------------------
 * | Data: 2019-03-18
 * | ---------------------------------------------------------------------------------------------------
 * | Desc:
 * | ---------------------------------------------------------------------------------------------------
 */

namespace app\service\websocket\handler\drivers;

use app\service\websocket\handler\Driver;

class Msg extends Driver
{
    protected function getData()
    {
        return [
            'content' => $this->data['content'],
            'from'    => $this->getFromInfo()['fd'],
            'to'      => $this->getFromInfo()['fd'],
            'time'    => $this->getTime()
        ];
    }

    protected function getToInfo()
    {
        return [
            'fd' => $this->getFromInfo()['fd']
        ];
    }

}